<template>
   <div id="app">
       父组件---{{msg}}<br />
       <SonCom @event='eventFn' />
   </div>
</template>
<script setup>
import {ref} from 'vue'
import SonCom from './components/SonCom.vue'
let msg = ref('')
const eventFn = (val)=>{
    console.log(1,val)
    msg.value = val
}
</script>
<style>
</style>


 
 
